import http from '@/utils/http'

export const api = {
  // 通用请求方法
  request(config) {
    return http.request(config)
  },
  
  get(url, params = {}) {
    return http.get(url, { params })
  },
  
  post(url, data = {}) {
    return http.post(url, data)
  },
  
  put(url, data = {}) {
    return http.put(url, data)
  },
  
  delete(url, params = {}) {
    return http.delete(url, { params })
  }
}